<script type="text/javascript">
    $(document).ready(
            function () {
                var searchBoxDefaultValue = $("#searchBox").val();
                $("#searchBox").focus(
                        function () {
                            $('#site_logo').hide();
                        });
//                $("#searchBox").blur(
//                        function () {
//                            if (this.value == '') {
//                                $(this).css("color", "gray");
//                                this.value = searchBoxDefaultValue;
//                            }
//                        });

                $("#searchBox").keyup(
                        function(){
                            $('#search_result').html('Loading...');
                            $('#search_result').show();
                            if($('#searchBox').val() != ''){
                                $('#search_result').load('<?=site_url('index/fetch_result/2')?>/' + $('#searchBox').val());
                            }else{
                                $('#search_result').html('Please type in some keyword');
                            }
                        });

                $("#searchBtn").click(
                        function(){
                            $('#search_result').html('Loading...');
                            $('#site_logo').hide();
                            $('#search_result').show();
                            $('#search_result').load('<?=site_url('index/fetch_result/2')?>/' + $('#searchBox').val());
                            return false;
                        });
            });
</script>
<div id="site_logo" style="text-align:center; width:100%; font-size:30pt; margin:80px 0 20px;">
    <img src="<?=base_url()?>./images/logo.png" />
</div>
<div id="searchContainer">
    <form action="" method="post" enctype="multipart/form-data" name="search" target="_self">
        <input id="searchBox" name="searchBox" type="text" />
        <input id="searchBtn" type="submit" value="Search"/>
    </form>

    <div id="search_result" style="display:none">
        <div>Loading...</div>
    </div>

    <div id="pop_win" style="left:50%;display:none;position:absolute;top:50px;">
        Please Wait...
    </div>
</div>